This utility converts a Basic program to a file of type Absolute (&ff8), which can be run just like the original program. The converted program has a couple of advantages:
• It is a bit safer against unwanted copying and modifying, because it
isn't easily recognizable as a Basic program.
But, more importantly,
• It can be treated by compression programs such as Acorn's 'squeeze', or
!Crunch (by BASS). These make it much smaller, up to 50%. You save disc
space and loading time, and the compression makes it fully incomprehensible.
(Note, however, that it makes no difference for the execution speed. To make
your program run faster, use a Basic cruncher, or a Basic compiler.)
The application is called !MakeApp2, after the original !MakeApp by Stuart Hickinbottom and John 'Lofty' Wallace. The improvement that !MakeApp2 gives is that it retains the command-line parameters. The old !MakeApp can not be used if your program has to read some parameters from the command line: the parameters are lost in the process.
!MakeApp2 comes with a utility that does the same, but can be called from the command line.
!MakeApp2 is FreeWare. For conditions of use, read the copyright notice at the end of this manual.
How to use it
—————————————
The program installs itself on the icon bar. To convert a Basic file, drop it on the icon. A 'Save as:' window opens, from where you can change the leafname. The conversion starts when you drag the file from that window to a directory viewer.
The Options window opens when you click with Select on the iconbar icon, or choose 'Options...' from the menu. There are two options:
'Preserve command parameters' - When off, !MakeApp2 omits the code that
retains the command-line parameters. This gives output that is about 200
bytes smaller than with the option on.
'Default output leafname' - Controls the filename in the 'Save as:' window,
when it is opened. Either it contains the same name as the input file, or
it contains the name that is entered in the writeable field.
The command-line version
————————————————————————
Included with !MakeApp2 is bas2app, a utility which does the same, but is run from the command line. That way, it can be used by other programs, or it can be started from an Obey file. You can find bas2app inside the application directory, in subdirectory CLIapp. The command syntax is
bas2app infile [outfile]
If no 'outfile' is given, then the output file has the same name, i.e. the input file is overwritten (!).
The command parameters are always preserved. If you don't need that, then use
bas2app0.
How it works
————————————
!MakeApp2 adds a small ARMcode header to the Basic program. This header:
• Moves the Basic program to a suitable location in memory
• Reads the command line, converts it from
<program name> <parameters>
to
Basic -quit "<program name>" <parameters>
and stores this in the system variable MakeApp2$CLI
• Passes control to Basic by issuing the command
'Basic -quit @<start address>,<end address>'
The Basic program has an extra line (at the start) added, which
• Reads the content of the variable MakeApp2$CLI
• Changes the command line by a call to OS_SetEnv
• Deletes the variable
Version history
———————————————
1.00 First released version
1.01 Added the command-line version of the program
This program is FreeWare. This means that I retain the copyright. You may freely copy and distribute it, provided that it is complete with all original files, and that you do not sell it. PD libraries may charge a nominal fee for the cost of duplication, postage etc. When you use the program, you do so entirely at your own risk. You may change the program to suit your own needs. If it's a bug fix, or if you think it's an improvement, then please send the changes to me.